package com.example.yunJie.digitalSentry.service.impl;

import com.example.yunJie.digitalSentry.entity.MarketEntity;
import com.example.yunJie.digitalSentry.mapper.one.MarketMapper;
import com.example.yunJie.digitalSentry.service.MarketService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

import java.io.Serializable;
import java.util.List;

@Service
@RequiredArgsConstructor
public class MarketServiceImpl implements MarketService {

    private final MarketMapper marketMapper;

    @Override
    public int insert(MarketEntity marketEntity) {
        return marketMapper.insert(marketEntity);
    }

    @Override
    public int update(MarketEntity marketEntity) {
        return marketMapper.update(marketEntity);
    }

    @Override
    public int deleteById(Serializable id) {
        return marketMapper.deleteById(id);
    }

    @Override
    public int deleteIdList(List<Integer> idList) {
        return marketMapper.deleteIdList(idList);
    }

    @Override
    public MarketEntity findId(String id) {
        return marketMapper.findId(id);
    }

    @Override
    public List<MarketEntity> findAll() {
        return marketMapper.findAll();
    }

    @Override
    public MarketEntity findIdByMarketName(String marketName) {
        return marketMapper.findIdByMarketName(marketName);
    }
}
